package com.itwxz.system.controller.mobile;

import com.itwxz.common.core.domain.R;
import com.itwxz.system.domain.vo.WxzToolMenuVo;
import com.itwxz.system.service.IWxzToolService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 工具网站树Controller
 *
 * @author gastronome
 * @date 2025-04-30
 */
@Tag(name = "工具网站树Controller")
@RestController
@RequestMapping("/mobile/tool")
@RequiredArgsConstructor
public class WxzToolMobileController {
    private final IWxzToolService toolService;

    @GetMapping("/menu-list")
    @Cacheable(value = "tool", key = "'list'")
    public R<List<WxzToolMenuVo>> getMenuWithSites() {
        return R.ok(toolService.getMenuWithSites());
    }
}
